package com.example.liverock.myshape;

/**
 * Created by LiveRock on 2016/3/3.
 */
public class ShapeFactory {

    Shape shape;
    Poly poly;

    public Shape CreateBaseShpae(int type)
    {
        switch (type)
        {
            case R.id.circle:
                shape = new Circle();
                break;
            case R.id.rectangle:
                shape = new Rectangle();
                break;
            default:break;
        }
        return shape;
    }

    public Poly CreateInterfaceShpae(int type)
    {
        switch (type)
        {
            case R.id.circle:
                poly = new Circle();
                break;
            case R.id.rectangle:
                poly = new Rectangle();
                break;
            default:break;
        }
        return poly;
    }
}
